const mode = Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN;
const bottomDragAction = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM, mode);
bottomDragAction.connect('activated', () => {
- this.open(Main.layoutManager.bottomIndex);
+ this._keyboard.gestureActivate(Main.layoutManager.bottomIndex);
+ });
+ bottomDragAction.connect('progress', (_action, progress) => {
+ this._keyboard.gestureProgress(progress);
});
global.stage.add_action(bottomDragAction);
this._bottomDragAction = bottomDragAction;
this._keyboardRestingId = 0;
}
- open() {
+ open(immediate = false) {
this._clearShowIdle();
this._keyboardRequested = true;
return;
}
+ if (immediate) {
+ this._open();
+ return;
+ }
+
this._clearKeyboardRestTimer();
this._keyboardRestingId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
KEYBOARD_REST_TIME,
Main.layoutManager.keyboardBox.hide();
}
+ gestureProgress(delta) {
+ Main.layoutManager.keyboardBox.show();
+ let progress = Math.min(delta, this.height) / this.height;
+ this.translation_y = -this.height * progress;
+ this.opacity = 255 * progress;
+ if (this._focusWindow) {
+ const windowActor = this._focusWindow.get_compositor_private();
+ windowActor.translation_y = -this.height * progress;
+ }
+ }
+
+ gestureActivate() {
+ this.open(true);
+ }
+
resetSuggestions() {
if (this._suggestions)
this._suggestions.clear();